@extends('common/member')
@section('title','修改用户')
@section('cnt')
    <form class="form-horizontal" method="post" action="{{ route('user/edit',['id'=>$info->id]) }}">
        @csrf
        {{-- 模拟PUT请求 --}}
        @method('put')
            <div class="form-group">
                <label class="col-sm-2 control-label">用户名:</label>
                <div class="col-sm-10">
                    <input type="text" name="username" class="form-control" value="{{ $info->username }}">
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">密码:</label>
                <div class="col-sm-10">
                    <input type="password" name="password" class="form-control" value="{{ $info->password }}">
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">邮箱:</label>
                <div class="col-sm-10">
                    <input type="email" name="email" class="form-control" value="{{ $info->email }}">
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">QQ:</label>
                <div class="col-sm-10">
                    <input type="text" name="qq" class="form-control" value="{{ $info->qq }}">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10 text-right">
                    <button type="submit" class="btn btn-success">提交</button>
                </div>
            </div>
    </form>
    @if ($errors->any())
        <div class="alert alert-warning" role="alert">
            <ul>
                @foreach ($errors->all() as $item)
                    <li>{{ $item }}</li>
                @endforeach
            </ul>
        </div>
    @endif
@endsection